<div class="container">    
    <div class="row">
        <!-- Foto Pessoal -->
        <div class="col-sm-3 col-xs-8 col-lg-2">
            <div class="panel panel-default">               
                <div class="panel-body">
                    <form method="POST" id="formUpload" enctype="multipart/form-data" action="<?php echo base_url('index.php/conta/alterarFoto') ?>">  
                        <?php echo form_hidden('foto', $conta->Foto); ?>
                        <input type="file" style="display: none" id="uplFoto" name="uplFoto" onchange="javascript: $('#formUpload')[0].submit();"> 

                        <a href="#" onclick="$('#uplFoto')[0].click();">                   
                            <img src="<?php echo base_url('UploadImg/Perfil/' . $conta->Foto . '.jpg') ?>" style="max-height: 200px;min-height:100px; " class="img-thumbnail img-responsive">                   
                        </a>
                        <h5><?php echo $conta->Nome ?></h5>
                        <h5><?php echo $conta->Nascimento ?></h5>
                    </form>
                </div>
            </div>     
        </div>
        
        <!-- Dados Pessoais -->
        <form role="form" class="col-sm-8 col-lg-9 col-xs-12" role="form" method="POST" action="<?php echo base_url('index.php/conta/alterar')?>">  
           <fieldset>
              <legend>Dados pessoais</legend>
               <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="nome">Nome</label>
                  <input type="text" class="form-control" id="nome" name="nome" value="<?php echo $conta->Nome ?>" autofocus>
                </div>   
              <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="genero">Género</label>
                  <label>Género</label>
                  <div class="radio">
                      Masculino <input type="radio" name="genero" id="genero" value="M" <?php if($conta->Genero == 'M') echo 'checked'?> >                    
                  </div>
                  <div class="radio">                    
                      Feminino <input type="radio" name="genero" id="genero" value="F" <?php if($conta->Genero == 'F') echo 'checked' ?>>  
                  </div>
               </div> 
              <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <div>
                      <label>Relacionamento</label>
                  </div>
                  <div class="col-sm-8 col-xs-12 col-lg-4">
                      <select name="relacionamento" class="form-control">
                       <?php $rels = array('1' => 'Solteiro', '2' => 'Casado', '3' => 'Namorando', '4' => 'Outro') ?>                        
                          <?php foreach ($rels as $value=>$text){ ?>                          
                          <option value="<?php echo $value ?>" <?php echo ($conta->Relacionamento == $value ) ? 'selected="selected"' : ''?> >
                              <?php echo $text ?></option>
                          <?php }?>
                  </select>
                  </div>
              </div>   
           </fieldset>
             <fieldset>
              <legend>Contato</legend>
               <div class="form-group col-sm-6 col-xs-7 col-lg-5">
                  <label for="telefone">Telefone</label>
                  <input type="tel" class="form-control" id="nome" name="telefone" placeholder="Telefone de contato..." value="<?php echo $conta->Telefone ?>">
                </div>
              <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="email">Email</label>
                  <input type="email" class="form-control" id="nome" name="email" placeholder="Email..." value="<?php echo $conta->Email ?>">
                </div>
             </fieldset>
              <fieldset>
             <legend>Educação</legend>
               <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="areaEstudo">Qual área ou grau de estudo</label>
                  <input type="text" class="form-control" id="nome" name="areaEstudo" placeholder="Grau ou área de estudo..." value="<?php echo $conta->AreaEstudo ?>">
                </div>
              <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="instEnsino">Instituição de Ensino</label>
                  <input type="text" class="form-control" id="nome" name="instEnsino" placeholder="Instituição onde estuda..." value="<?php echo $conta->InstEnsino ?>">
                </div>
             </fieldset>
            <fieldset>
              <legend>Profissional</legend>
               <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="profissao">Profissão</label>
                  <input type="text" class="form-control" id="nome" name="profissao" placeholder="Sua Profissão..." value="<?php echo $conta->Profissao ?>">
                </div>
              <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="areaProfissional">Área de atuação</label>
                  <input type="text" class="form-control" id="nome" name="areaProfissional" placeholder="Sua área de atuação..." value="<?php echo $conta->AreaProfissional ?>">
                </div>
             </fieldset>
            <fieldset>
              <legend>Endereço</legend>
               <div class="form-group col-sm-10 col-xs-10 col-lg-8">
                  <label for="endereco">Endereço</label>
                  <input type="text" class="form-control" id="nome" name="endereco" placeholder="Seu endereço atual..." value="<?php echo $conta->Endereco ?>">
                </div>
               <div class="form-group col-sm-8 col-xs-8 col-lg-6">
                  <label for="cidade">Cidade</label>
                  <input type="text" class="form-control" id="nome" name="cidade" placeholder="Sua cidade..." value="<?php echo $conta->Cidade ?>">
                </div>
                <div class="form-group col-sm-2 col-xs-4 col-lg-2">
                  <label for="uf">Estado/UF</label>
                  <select name="uf" class="form-control">                      
                    <?php $ufs = array('AC','AL','AM','AP','BA','CE','DF','ES',
                      'GO','MA','MG','MS','MT','PA','PB','PE','PI','PR','RJ',
                      'RN','RO','RR','RS','SC','SE','SP','TO',) ?>                        
                    <?php foreach ($ufs as $uf){ ?>                          
                    <option value="<?php echo $uf ?>" <?php echo ($conta->UF == $uf ) ? 'selected="selected"' : ''?> >
                        <?php echo $uf ?></option>
                    <?php }?>
                  </select>
                 </div>
           </fieldset>             
           <button type="submit" class="btn btn-primary">
              Salvar
           </button>
        </form>
     </div>
</div>
